#include "seq.h"
namespace smil {
    duration seq::get_implicit_syncbase(SMILbase * it)
    {
        std::list< Glib::RefPtr<SMILbase> >::iterator iter = children.begin();// iterator of children first
        for (;iter != children.end(); iter++) // for (no init); iter != end; iter++
        if (iter->operator->() == it) break; // that's it!
        if (iter == children.end()) return duration(SYNC_UNRESOLVED); // YOU ARE NOT THE FATHER.
        if (iter == children.begin()) return parent->get_implicit_syncbase(this); // First element like anything else
        iter--;
        return (*iter)->get_end(); // syncbase is the active end of the previous element.
    };
}
